module foreach_loop ();

byte uarr1 [10] = '{0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
byte uarr2 [3][4] = '{
    '{0, 1, 2, 3},
    '{4, 5, 6, 7},
    '{8, 9, 10, 11}
};

initial begin
    
    foreach (uarr1[i]) begin
        $display ("uarr1[%0d] = %0d", i, uarr1[i]);
    end

    foreach (uarr2[i,j]) begin
        $display ("uarr2[%0d][%0d] = %0d", i, j, uarr2[i][j]);
    end

    #1 $finish;
end

endmodule
